package com.kly.user.enums;

/**
 * 性别 0未知、1男、2女、3武装直升机
 * @author linqu
 */
public enum GenderEnum {

    UNKNOWN(0, "QUEER", "QUEER"),

    MAN(1, "MAN", "MAN"),

    WOMAN(2, "WOMAN", "WOMAN"),

    OTHERS(3, "ALL", "ALL"),

    ;

    private final int type;

    private final String Value;

    private final String description;


    GenderEnum(int type, String value, String description) {
        this.type = type;
        Value = value;
        this.description = description;
    }

    public int getType() {
        return type;
    }

    public String getValue() {
        return Value;
    }

    public String getDescription() {
        return description;
    }


    public static GenderEnum fromType(int type) {
        for (GenderEnum userStatus : values()) {
            if (userStatus.getType() == type) {
                return userStatus;
            }
        }
        throw new IllegalArgumentException("Invalid login type: " + type);
    }
}
